Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 7 - Process Management / Process Management Reference
Functions / Allocating and Freeing Memory


OTAllocMem

Allocates memory from the Open Transport memory pool.

C INTERFACE
void* OTAllocMem(size_t nbytes)
C++ INTERFACES
None. C++ applications use the C interface to this function.

PARAMETERS
nbytes
The amount (in bytes) of memory to allocate.
DESCRIPTION
The OTAllocMem function allocates raw memory from a pool that Open Transport has created for a client application. This function returns a pointer to the allocated memory that the OTFreeMem function uses when to deallocate
this memory.

SPECIAL CONSIDERATIONS
Do not make this call without having already called the OTEnterInterrupt function.

SEE ALSO
To free the memory you allocated with this function, use the OTFreeMem function (described next).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996